package org.reyton.entity;
// Generated 2016-11-30 16:19:22 by Hibernate Tools 5.2.0.Beta1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * BizClaimVoucher generated by hbm2java
 */
@Entity
@Table(name = "BIZ_CLAIM_VOUCHER", catalog = "jboa")
public class BizClaimVoucher implements java.io.Serializable {

	private Integer id;
	private SysDictionary sysDictionary;
	private SysEmployee sysEmployeeByCreateSn;
	private SysEmployee sysEmployeeByNextDealSn;
	private Date createTime;
	private String event;
	private int totalAccount;
	private Set<BizClaimVoucherDetail> bizClaimVoucherDetails = new HashSet<BizClaimVoucherDetail>(0);

	public BizClaimVoucher() {
	}

	public BizClaimVoucher(SysDictionary sysDictionary, SysEmployee sysEmployeeByCreateSn, Date createTime,
			String event, int totalAccount) {
		this.sysDictionary = sysDictionary;
		this.sysEmployeeByCreateSn = sysEmployeeByCreateSn;
		this.createTime = createTime;
		this.event = event;
		this.totalAccount = totalAccount;
	}

	public BizClaimVoucher(SysDictionary sysDictionary, SysEmployee sysEmployeeByCreateSn,
			SysEmployee sysEmployeeByNextDealSn, Date createTime, String event, int totalAccount,
			Set<BizClaimVoucherDetail> bizClaimVoucherDetails) {
		this.sysDictionary = sysDictionary;
		this.sysEmployeeByCreateSn = sysEmployeeByCreateSn;
		this.sysEmployeeByNextDealSn = sysEmployeeByNextDealSn;
		this.createTime = createTime;
		this.event = event;
		this.totalAccount = totalAccount;
		this.bizClaimVoucherDetails = bizClaimVoucherDetails;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "STATUS", nullable = false)
	public SysDictionary getSysDictionary() {
		return this.sysDictionary;
	}

	public void setSysDictionary(SysDictionary sysDictionary) {
		this.sysDictionary = sysDictionary;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "CREATE_SN", nullable = false)
	public SysEmployee getSysEmployeeByCreateSn() {
		return this.sysEmployeeByCreateSn;
	}

	public void setSysEmployeeByCreateSn(SysEmployee sysEmployeeByCreateSn) {
		this.sysEmployeeByCreateSn = sysEmployeeByCreateSn;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "NEXT_DEAL_SN")
	public SysEmployee getSysEmployeeByNextDealSn() {
		return this.sysEmployeeByNextDealSn;
	}

	public void setSysEmployeeByNextDealSn(SysEmployee sysEmployeeByNextDealSn) {
		this.sysEmployeeByNextDealSn = sysEmployeeByNextDealSn;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "EVENT", nullable = false)
	public String getEvent() {
		return this.event;
	}

	public void setEvent(String event) {
		this.event = event;
	}

	@Column(name = "TOTAL_ACCOUNT", nullable = false)
	public int getTotalAccount() {
		return this.totalAccount;
	}

	public void setTotalAccount(int totalAccount) {
		this.totalAccount = totalAccount;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "bizClaimVoucher")
	public Set<BizClaimVoucherDetail> getBizClaimVoucherDetails() {
		return this.bizClaimVoucherDetails;
	}

	public void setBizClaimVoucherDetails(Set<BizClaimVoucherDetail> bizClaimVoucherDetails) {
		this.bizClaimVoucherDetails = bizClaimVoucherDetails;
	}

}
